import * as actionTypes from "./actionTypes";
import { getAddress } from '../../../../apis/shop'
export const changeAllList = (result) => ({
    type: actionTypes.getAddressList,
    result,
})
export const editAdressList = (result) => ({
    type: actionTypes.editAdressList,
    result,
})
export const addAdressList = (result) => ({
    type: actionTypes.addAdressList,
    result,
})  
//页面初始化
export const getAddressList = () => {
    return (dispatch) => {
        console.log(121)
        getAddress().then(res=>{
            dispatch(changeAllList( res.data))
        })
    }
}
